package com.hopu.mybatis01.mapper;

import com.hopu.mybatis01.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.boot.autoconfigure.security.SecurityProperties;

import java.util.List;

public interface UserMapper {
    //查询全部

    List<User> selectUsers(String username,String password);
    //添加
    @Insert("insert into t_user(username,password) values(#{username},#{password}) ")
    void insert(User user);
    //修改
//    @Update("update t_user set username=#{username},password=#{password} where id=#{id}")
    void update(User user);
    //删除
//    @Delete("delete from t_user where id=#{id}")
    void deleteById(Long id);
}
